package taskservice;

import modelservice.Server;

public class OGMSService_DEBUG {
	
	public static Server CreateServer(String ip, int port) {
		return new Server(ip, port);
	}
	
	public static GeoDataExServer CreateDataExchangeServer(String ip, int port, String userName){
		GeoDataExServer dataExServer = new GeoDataExServer(ip, port, userName);
		if(dataExServer.connect() == 1){
			return dataExServer;
		}else{
			return null;
		}
	}
	
	public static GeoTaskServer CreateTaskServer(String ip, int port){
		GeoTaskServer taskServer = new GeoTaskServer(ip, port);
		if(taskServer.connect() == 1){
			return taskServer;
		}else{
			return null;
		}
	}
	
	public static GeoDataServiceServer CreateDataServiceServer(String ip, int port, String userName){
		GeoDataServiceServer dataServiceServer = new GeoDataServiceServer(ip, port, userName);
		if(dataServiceServer.connect() == 1){
			return dataServiceServer;
		}else{
			return null;
		}
	}

}
